#include <iostream>
#include <string>
#include <sys/types.h>
#include <signal.h>

int main(int argc,char* argv[])
{
    if(argc != 3)
    {
        std::cout<<"请输入合法的格式: ./myKill sigNumber pid"<<std::endl;
    }
    int sigNumber = std::stoi(argv[1]);
    pid_t pid = std::stoi(argv[2]);
    int n = kill(pid,sigNumber);
    n == 0 ? std::cout<<"信号发送成功"<<std::endl : std::cout<<"信号发送失败"<<std::endl;

    return 0;
}